{template header}

<script>
$(document).ready(function() {

//选择一级区域
$('#cateid').change(function(){
	$("#select2").html('<img src="'+siteUrl+'public/images/loading.gif" />');
	var cateid = $(this).children('option:selected').val();  //弹出select的值
	
	if(cateid==0){
		$("#select2").html('');
		$("#select3").html('');
	}else{
		$("#select3").html('');
		$.ajax({
			type: "GET",
			url:  "{SITE_URL}index.php?app=group&ac=cate&ts=two&cateid="+cateid,
			success: function(msg){
				$("#select2").html(msg);
				
				//选择二级区域
				$('#cateid2').change(function(){
					$("#select3").html('<img src="'+siteUrl+'public/images/loading.gif" />');
					var cateid2 = $(this).children('option:selected').val();  //弹出select的值
					
					if(cateid2 == 0){
						$("#select3").html('');
					}else{
					
						//ajax
						$.ajax({
							type: "GET",
							url:  "{SITE_URL}index.php?app=group&ac=cate&ts=three&cateid2="+cateid2,
							success: function(msg){
								$('#select3').html(msg);
							}
						});
					
					}

				});
				
			}
		});
	
	}
	
});

});
</script>

<div class="container">

    <ol class="breadcrumb">
        <li><a href="{SITE_URL}">首页</a></li>
        <li><a href="{tsUrl('group')}">小组</a></li>
        <li><a href="{tsUrl('group','show',array('id'=>$strGroup['groupid']))}">{$strGroup[groupname]}</a></li>
        <li class="active">小组设置</li>
    </ol>

    <div class="panel panel-default">
        <div class="panel-body">
{template edit_xbar}



<div class="row">
<div class="col-md-8">


<form method="post" action="{SITE_URL}index.php?app=group&ac=cate&ts=do">
<select  id="cateid" name="cateid">
<option value="0">请选择一级分类</option>
{loop $arrCate $key $item}
<option value="{$item['cateid']}">{$item['catename']}</option>
{/loop}
</select>

<span id="select2"></span>
<span id="select3"></span>

<input type="hidden" name="groupid" value="{$strGroup['groupid']}" />
<input type="hidden" name="token" value="{$_SESSION['token']}" />
<button class="btn btn-success" type="submit">修改</button>
    <a class="btn btn-default" href="{tsUrl('group','show',array('id'=>$strGroup[groupid]))}">返回小组</a>
</form>


<div>
{if $strCate}
一级：{$strCate['catename']}

{/if}
{if $strCate2}
二级：{$strCate2['catename']}

{/if}
{if $strCate3}
三级：{$strCate3['catename']}

{/if}
</div>


</div>
<div class="col-md-4"></div>
</div>








</div>
</div>

</div>
{template footer}